#次数消耗
execute store result score #LastCount temp run data get entity @s item.components."minecraft:custom_data".last_count
execute store result entity @s item.components."minecraft:custom_data".last_count int 1 run scoreboard players remove #LastCount temp 1

execute if score #LastCount temp matches ..0 run function dab:system/mystic_pedestal/remove_effect with entity @n[tag=mystic_pedestal.display,type=item_display,distance=..1] item

#若玩家不可重复使用记录所有使用玩家
execute if data entity @s item.components."minecraft:custom_data"{player_can_reuse:false} run data modify entity @s item.components."minecraft:custom_data".cant_use_players append from entity @n[tag=mystic_pedestal.interaction,type=interaction,distance=..1] interaction.player

scoreboard players reset #LastCount temp